package year2020.month03456;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TestTime {

    public static void main(String[] args) throws ParseException {
        long timeMillis = System.currentTimeMillis();
        System.out.println(timeMillis);
        System.out.println(timeMillis/1000*1000);

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String dateStr = sdf.format(new Date());
        Date date =  sdf.parse(dateStr);

        System.out.println(dateStr);
        System.out.println(date.getTime());
    }

}
